Skip to content

Use docker/bake-action to share base layer across images#2921

Merged
adamtheturtle merged 3 commits intomainfrom
adamtheturtle/docker-shared-layers
Feb 15, 2026
Merged

Use docker/bake-action to share base layer across images#2921
adamtheturtle merged 3 commits intomainfrom
adamtheturtle/docker-shared-layers

Conversation

@adamtheturtle
Copy link
Member

@adamtheturtle adamtheturtle commented Feb 15, 2026

Summary

  • Replaced matrix strategy with docker/bake-action for building three Docker images
  • Base layer is now built once and shared across all targets instead of three times
  • Added docker-bake.hcl to define build targets declaratively

Benefits

  • Improves multi-platform build performance on releases
  • Simplifies the workflow by eliminating matrix complexity
  • Leverages buildx's native layer caching across targets

Note

Medium Risk
Changes CI/release Docker publishing logic and tagging via bake, which could break image outputs if the bake definition or VERSION env is misconfigured; no runtime code is affected.

Overview
Build/publish workflows now use docker/bake-action and a new docker-bake.hcl to build the vws, vwq, and target-manager images together (sharing a common base and platforms) instead of a per-image matrix with docker/build-push-action.

docker-build.yml adds a bake definition check step and builds all images in one run, and release.yml publishes all bake targets in one step using VERSION for versioned tags. Pre-commit adds hclfmt for formatting .hcl files, and the changelog is bumped to 2026.02.15.5.

Written by Cursor Bugbot for commit 4bc5537. This will update automatically on new commits. Configure here.

Replace the matrix strategy with docker/bake-action, which builds all three targets (vws, vwq, target-manager) in a single invocation. This allows the shared base stage to be built once instead of three times, improving build performance on multi-platform releases.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@adamtheturtle adamtheturtle merged commit 7192e14 into main Feb 15, 2026
12 checks passed
@adamtheturtle adamtheturtle deleted the adamtheturtle/docker-shared-layers branch February 15, 2026 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant